import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Modal } from 'antd';

import styles from './style.scss';

export default class ImageView extends Component {
    static propTypes = {
        imageSrc: PropTypes.string,
    };

    static defaultProps = {
    };

    render() {
        const { imageSrc, ...props } = this.props;
        return (
            <Modal
                {...props}
                wrapClassName={styles.imageView}
                footer={null}
                width="500"
            >
                <img alt="Image Viewer" width="100%" src={imageSrc} />
            </Modal>
        );
    }
}
